<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:s="http://jboss.org/seam/faces"
	xmlns:o="http://omnifaces.org/ui"
	xmlns:of="http://omnifaces.org/functions"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:sig="http://java.sun.com/jsf/composite/components">
	
	<sig:inputListOfValues
		id="PessoaFisica"
		list="#{pessoaFisicaList}"
		label="Nome"
		width="300px;"
		required="true"
		value="#{contatoAction.instance.pessoaFisica.nome}" />
		
	<sig:decorate id="decorateCargo" label="#{messages['label.cargo']}">
	    <p:selectOneMenu id="cargo" value="#{contatoAction.instance.cargo}" required="true">
	    	<f:selectItem itemLabel="#{messages['label.selecione']}" />
	    	<f:selectItems value="#{cargoList.resultList}" itemLabel="#{cargo.nome}" itemValue="#{cargo}" var="cargo" />
	    	<f:converter converterId="entityConverter" />
	    </p:selectOneMenu>
	</sig:decorate>
	
	<sig:decorate id="decorateDepartamento" label="#{messages['label.departamento']}">
	    <p:selectOneMenu id="departamento" value="#{contatoAction.instance.departamento}" required="true">
	    	<f:selectItem itemLabel="#{messages['label.selecione']}" />
	    	<f:selectItems value="#{departamentoList.resultList}" itemLabel="#{departamento.nome}" itemValue="#{departamento}" var="departamento" />
	    	<f:converter converterId="entityConverter" />
	    </p:selectOneMenu>
	</sig:decorate>
		
	<br clear="all" />
	
	<p:fieldset id="fieldsetMeioDeContato" legend="Meio de Contato" style="width: 735px">
			
		<sig:decorate id="decorateTelefoneComercial" label="#{messages['label.telefone.comercial']}">
			<p:inputMask value="#{contatoAction.instance.meioDeContato.telefoneComercial}" mask="#{messages['mask.phone']}" required="true" styleClass="phone" converter="inputConverter" />
		</sig:decorate>
		
		<sig:decorate id="decorateTelefoneFixo" label="#{messages['label.telefone.fixo']}">
			<p:inputMask value="#{contatoAction.instance.meioDeContato.telefoneFixo}" mask="#{messages['mask.phone']}" styleClass="phone" converter="inputConverter" />
		</sig:decorate>
		
		<sig:decorate id="decorateTelefoneMovel" label="#{messages['label.telefone.movel']}">
			<p:inputMask value="#{contatoAction.instance.meioDeContato.telefoneMovel}" mask="#{messages['mask.phone']}" required="true" styleClass="phone" converter="inputConverter" />
		</sig:decorate>
		
		<sig:decorate id="decorateEmail" label="#{messages['label.email']}">
			<h:inputText id="email" value="#{contatoAction.instance.meioDeContato.email}" required="true" styleClass="email" />
		</sig:decorate>
		
	</p:fieldset>
	
	<br clear="all" />
	
	<sig:decorate id="decorateObservacao" label="#{messages['label.observacao']}">
		<h:inputTextarea id="observacao" value="#{contatoAction.instance.observacao}" rows="3" cols="120" />
	</sig:decorate>
	
	<br clear="all" />
</ui:composition>